import java.awt.*;

public class GetCoordinates{
    public static void main(String[] args) throws InterruptedException {
        while (true) {
            Point mousePoint = MouseInfo.getPointerInfo().getLocation();
            int x = (int) mousePoint.getX();
            int y = (int) mousePoint.getY();
            System.out.println("Current mouse coordinate: (" + x + ", " + y + ")");
            Thread.sleep(1000);
        } // 410, 96 ~ 500, 96
        // 举手的位置 (1486, 970)
        // 举手之后头像的位置(313~357, 966)    435, 967
    }
}
